using System;
using System.Collections.Specialized;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
using System.Windows.Forms;

namespace TextEditorDP
{
    public interface Command
    {

        /**
         * Execute this command. If succeeded (return TRUE), the 
         * CommandManager will put this command into command list 
         * if this command can support undo. 
         * 
         * @return True if the command executed succussfully.
         */
        bool Execute();

        /**
         * Undo this command. This is used to implement "Undo"
         */
        void UnExecute();

        /**
         * If this command can support undo. Some commands not support 
         * undo such as CopyCommand, PastCommand. 
         * 
         * @return True if this command can undo.
         */
        bool CanUndo();
    }
}
